<?php
// R0910CMS 
// created by Jackery
// time : 20100513
if(!defined("IN_R0910CMS")) {
    exit("Access Denied!");
}
//Website Add Action

class AddWebsite extends R_Action_Abstract{
	private $thisWebsite;
	function __construct() {
	}
	
	function UIAddWebsite() {
		$this->thisWebsite='';
	}
	
	function checkWebsitePath($websitePath) {
		if(file_exists($websitePath)) {
			return true;
		} else {
			return false;
		}
	}
	function addBasicInfo($basicInfo) {
		if(in_array(array('name','path'),$basicInfo)){
			if(self::checkWebsitePath($basicInfo['path'])) {
				getInstance('R_Model_AddWebsite')->addInfo($basicInfo);
			} else {
				throw new R_Exception("Website path not exists");
			}
		} else {
			throw new R_Exception("Website Infomation not full");
		}
	}
	function addExtraInfo($extraInfo){
		if(in_array(array('desctiprion','copyright','version'),$extraInfo)){
			getInstance('R_Model_AddWebsite')->addInfo($extraInfo);
		}
	}
	
	function setRelatedRights() {
		;
	}
	function setWebsite() {
		;
	}
}